This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Emit events to bonding and unbonding ops in Staking pallet#5228
Merged
Emit events to bonding and unbonding ops in Staking pallet#5228
Conversation
This comment has been minimized.
This comment has been minimized.
Contributor
|
I am slightly against because at least the example of unbond can easily be determined by the origin/service provider. Generally, (and preferably) the chain should be seen as lazy unit that does something (i.e. store and emit an event) only when it absolutely has to. I think this stuff can be computed offchain. Nonetheless, if it is worth the cost of an event, I am also okay with this. |
kianenigma
reviewed
Mar 12, 2020
kianenigma
reviewed
Mar 12, 2020
kianenigma
approved these changes
Mar 12, 2020
General-Beck
pushed a commit
to General-Beck/substrate
that referenced
this pull request
Mar 17, 2020
…h#5228) * add events to bonding and unbonding ops * add semicolon on event line * fix nits
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5223
The reason to emit events is to find out the actual change to the staking ledger as users could call
bond,bond_extra,unbond, orwithdraw_unbondedwith a differentvaluethan will actually update the staking ledger.